import Vue from 'vue'
import Router from 'vue-router'
import HelloWorld from '@/components/HelloWorld'
import test from '@/components/test'
import l_header from '@/Home/l_header'
import Home from '@/Home/Home'
import menu from '@/components/menu'
import search from '@/components/search'
import tablefrom from '@/components/tablefrom'
import login from '@/components/login'
import User from '@/components/User'
import Register from '@/components/Register'
import Table from '@/components/Table'
import oauth from '@/components/oauth'
import Email from '@/components/Email'
import Update from '@/components/Update'
import AddRole from '@/components/AddRole'
import ShowRole from '@/components/ShowRole'
import UserAddRole from '@/components/UserAddRole'
import Addmb from '@/components/moban/Addmb'
import Addproves from '@/components/moban/Addproves'
import Newsp from '@/components/moban/Newsp'
import Tablelist from '@/components/moban/Tablelist'
import Gongdan from '@/components/moban/Gongdan'
import DynamicForm from '@/components/Gongdan/DynamicForm'
import Showgd from '@/components/Gongdan/Showgd'
import Index from '@/components/WorkList/Index'
import Addusers from '@/components/WorkList/Addusers'
import Button from '@/components/WorkList/Button'
import TableList from '@/components/WorkList/TableList'


Vue.use(Router)

export default new Router({
  mode:'history',
  routes: [
    // {
    //   path: '/',
    //   name: 'HelloWorld',
    //   component: HelloWorld
    // },

    {
      path: '/',
      name: 'Home',
      component: Home,
      children:[

        {
          path:'/Addproves',
          name: 'Addproves',
          component: Addproves,
        },
        {
          path:'/menu',
          name: 'menu',
          component: menu,
        },
        {
          path:'/Addmb',
          name: 'Addmb',
          component: Addmb,
        },
        {
          path:'/User',
          name: 'User',
          component: User,
        },
        {
          path: '/login',
          name: 'login',
          component: login
        },
        {
          path: '/Register',
          name: 'Register',
          component: Register
        },
        {
          path: '/l_header',
          name: 'l_header',
          component: l_header
        },
        {
          path:'/Gongdan',
          name: 'Gongdan',
          component: Gongdan,
        },
        {
          path:'/DynamicForm',
          name: 'DynamicForm',
          component: DynamicForm,
        },
        {
          path:'/Showgd',
          name: 'Showgd',
          component: Showgd,
        },
        {
          path:'/Index',
          name: 'Index',
          component: Index,
        },
      ]
    },

    {
      path: '/Newsp',
      name: 'Newsp',
      component: Newsp
    },
    {
      path:'/Tablelist',
      name: 'Tablelist',
      component: Tablelist,
    },

    {
      path: '/oauth/callback',
      name: 'oauth',
      component: oauth
    },
    {
      path: '/Table',
      name: 'Table',
      component: Table
    },
    {
      path: '/Update',
      name: 'Update',
      component: Update
    },
    {
      path: '/Email',
      name: 'Email',
      component: Email
    },
    {
      path: '/test',
      name: 'test',
      component: test
    },

    {
      path: '/search',
      name: 'search',
      component: search
    },
    {
      path: '/tablefrom',
      name: 'tablefrom',
      component: tablefrom
    },
    {
      path: '/AddRole',
      name: 'AddRole',
      component: AddRole
    },
    {
      path: '/ShowRole',
      name: 'ShowRole',
      component: ShowRole
    },
    {
      path: '/UserAddRole',
      name: 'UserAddRole',
      component: UserAddRole
    },
    {
      path: '/Addusers',
      name: 'Addusers',
      component: Addusers
    },
    {
      path: '/Button',
      name: 'Button',
      component: Button
    },
    {
      path: '/TableList',
      name: 'TableList',
      component: TableList
    },
  ]
})
